﻿using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;

namespace ResourceReportBuilder
{
    public class WebResourceCollection : BindingList<WebResource>
    {
        //private string[] _classList = null;
        //public string[] ClassList
        //{
        //    get
        //    {
        //        if (_classList == null || _classList.Length == 0)
        //        {
        //            _classList = GetClassList();
        //        }
        //        return _classList;
        //    }
        //}

        //public string ProjectPath { get; private set; }

        

        public WebResourceCollection()//string projectPath)
            : base()
        {
            //ProjectPath = projectPath;
        }

        public WebResourceCollection(IEnumerable<string> fileNames)
        {
            //ProjectPath = projectPath;
            AddRange(fileNames);
        }

        public void AddRange(IEnumerable<string> fileNames)
        {
            fileNames.ToList().ForEach(item => base.Add(new WebResource(item)));
        }
    }
}
